#pragma once
#include"LRUCache.h"
#include"Singleton.h"

class CacheManager:Singleton<CacheManager>
{
    friend class Singleton<CacheManager>;
public:
    CacheManager(int num,int Capacity){
        for(int i = 0;i<num ; ++i){
            _caches.push_back(new LRUCache(Capacity));
        }
    }

    void init();

    void upsend();

    void allots();

    LRUCache* getcache(int name);

public:
    vector<LRUCache*> _caches;
};